/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package slcu.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import slcu.model.Partido;

import java.util.List;

/**
 * The persistence utility for the Partido service. This utility wraps {@link PartidoPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author tito
 * @see PartidoPersistence
 * @see PartidoPersistenceImpl
 * @generated
 */
public class PartidoUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
	 */

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(Partido partido) {
		getPersistence().clearCache(partido);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<Partido> findWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<Partido> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<Partido> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static Partido update(Partido partido, boolean merge)
		throws SystemException {
		return getPersistence().update(partido, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static Partido update(Partido partido, boolean merge,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(partido, merge, serviceContext);
	}

	/**
	* Caches the Partido in the entity cache if it is enabled.
	*
	* @param partido the Partido
	*/
	public static void cacheResult(slcu.model.Partido partido) {
		getPersistence().cacheResult(partido);
	}

	/**
	* Caches the Partidos in the entity cache if it is enabled.
	*
	* @param partidos the Partidos
	*/
	public static void cacheResult(java.util.List<slcu.model.Partido> partidos) {
		getPersistence().cacheResult(partidos);
	}

	/**
	* Creates a new Partido with the primary key. Does not add the Partido to the database.
	*
	* @param partidoId the primary key for the new Partido
	* @return the new Partido
	*/
	public static slcu.model.Partido create(long partidoId) {
		return getPersistence().create(partidoId);
	}

	/**
	* Removes the Partido with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param partidoId the primary key of the Partido
	* @return the Partido that was removed
	* @throws slcu.NoSuchPartidoException if a Partido with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido remove(long partidoId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchPartidoException {
		return getPersistence().remove(partidoId);
	}

	public static slcu.model.Partido updateImpl(slcu.model.Partido partido,
		boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(partido, merge);
	}

	/**
	* Returns the Partido with the primary key or throws a {@link slcu.NoSuchPartidoException} if it could not be found.
	*
	* @param partidoId the primary key of the Partido
	* @return the Partido
	* @throws slcu.NoSuchPartidoException if a Partido with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido findByPrimaryKey(long partidoId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchPartidoException {
		return getPersistence().findByPrimaryKey(partidoId);
	}

	/**
	* Returns the Partido with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param partidoId the primary key of the Partido
	* @return the Partido, or <code>null</code> if a Partido with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido fetchByPrimaryKey(long partidoId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(partidoId);
	}

	/**
	* Returns all the Partidos where categoriaId = &#63;.
	*
	* @param categoriaId the categoria ID
	* @return the matching Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Partido> findByCategoriaId(
		long categoriaId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByCategoriaId(categoriaId);
	}

	/**
	* Returns a range of all the Partidos where categoriaId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param categoriaId the categoria ID
	* @param start the lower bound of the range of Partidos
	* @param end the upper bound of the range of Partidos (not inclusive)
	* @return the range of matching Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Partido> findByCategoriaId(
		long categoriaId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByCategoriaId(categoriaId, start, end);
	}

	/**
	* Returns an ordered range of all the Partidos where categoriaId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param categoriaId the categoria ID
	* @param start the lower bound of the range of Partidos
	* @param end the upper bound of the range of Partidos (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Partido> findByCategoriaId(
		long categoriaId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByCategoriaId(categoriaId, start, end, orderByComparator);
	}

	/**
	* Returns the first Partido in the ordered set where categoriaId = &#63;.
	*
	* @param categoriaId the categoria ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Partido
	* @throws slcu.NoSuchPartidoException if a matching Partido could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido findByCategoriaId_First(long categoriaId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchPartidoException {
		return getPersistence()
				   .findByCategoriaId_First(categoriaId, orderByComparator);
	}

	/**
	* Returns the first Partido in the ordered set where categoriaId = &#63;.
	*
	* @param categoriaId the categoria ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Partido, or <code>null</code> if a matching Partido could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido fetchByCategoriaId_First(
		long categoriaId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByCategoriaId_First(categoriaId, orderByComparator);
	}

	/**
	* Returns the last Partido in the ordered set where categoriaId = &#63;.
	*
	* @param categoriaId the categoria ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Partido
	* @throws slcu.NoSuchPartidoException if a matching Partido could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido findByCategoriaId_Last(long categoriaId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchPartidoException {
		return getPersistence()
				   .findByCategoriaId_Last(categoriaId, orderByComparator);
	}

	/**
	* Returns the last Partido in the ordered set where categoriaId = &#63;.
	*
	* @param categoriaId the categoria ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Partido, or <code>null</code> if a matching Partido could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido fetchByCategoriaId_Last(long categoriaId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByCategoriaId_Last(categoriaId, orderByComparator);
	}

	/**
	* Returns the Partidos before and after the current Partido in the ordered set where categoriaId = &#63;.
	*
	* @param partidoId the primary key of the current Partido
	* @param categoriaId the categoria ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next Partido
	* @throws slcu.NoSuchPartidoException if a Partido with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Partido[] findByCategoriaId_PrevAndNext(
		long partidoId, long categoriaId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchPartidoException {
		return getPersistence()
				   .findByCategoriaId_PrevAndNext(partidoId, categoriaId,
			orderByComparator);
	}

	/**
	* Returns all the Partidos.
	*
	* @return the Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Partido> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Returns a range of all the Partidos.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Partidos
	* @param end the upper bound of the range of Partidos (not inclusive)
	* @return the range of Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Partido> findAll(int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Returns an ordered range of all the Partidos.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Partidos
	* @param end the upper bound of the range of Partidos (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Partido> findAll(int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the Partidos where categoriaId = &#63; from the database.
	*
	* @param categoriaId the categoria ID
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByCategoriaId(long categoriaId)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByCategoriaId(categoriaId);
	}

	/**
	* Removes all the Partidos from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Returns the number of Partidos where categoriaId = &#63;.
	*
	* @param categoriaId the categoria ID
	* @return the number of matching Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static int countByCategoriaId(long categoriaId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByCategoriaId(categoriaId);
	}

	/**
	* Returns the number of Partidos.
	*
	* @return the number of Partidos
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static PartidoPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (PartidoPersistence)PortletBeanLocatorUtil.locate(slcu.service.ClpSerializer.getServletContextName(),
					PartidoPersistence.class.getName());

			ReferenceRegistry.registerReference(PartidoUtil.class,
				"_persistence");
		}

		return _persistence;
	}

	/**
	 * @deprecated
	 */
	public void setPersistence(PartidoPersistence persistence) {
	}

	private static PartidoPersistence _persistence;
}